﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin.aspx.cs" Inherits="smallDeimos.Admin" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table>
    <tr>
    <td>
    </td>
    <td></td>
    <td></td></tr>
    </table>
        <asp:Label ID="Label1" runat="server" Font-Size="X-Large" Text="Admin panel"></asp:Label>
        <br />
        <br />
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
            Text="Create log table" />
        <asp:Button ID="Button2" runat="server" onclick="Button2_Click" 
            Text="Restart game" BackColor="#FF0066" BorderColor="Red" 
            BorderStyle="Double" BorderWidth="3px" Height="88px" Width="294px" />
        <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
        <br />
        Query<asp:TextBox ID="TextBox1" runat="server" Width="544px"></asp:TextBox>
        <asp:Button ID="Button4" runat="server" onclick="Button4_Click" Text="Run" />
        <br />
        <asp:Button ID="Button3" runat="server" onclick="Button3_Click" 
            Text="Create world" />
        <asp:Button ID="Button5" runat="server" Height="26px" onclick="Button5_Click" 
            Text="Clean db" />
    
        <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="True" 
            DataSourceID="SqlDataSource5">
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource5" runat="server" 
            ConnectionString="<%$ ConnectionStrings:smallDeimosConnectionString %>" 
            SelectCommand="SELECT * FROM [Configuration]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
            ConnectionString="<%$ ConnectionStrings:smallDeimosConnectionString %>" 
            SelectCommand="SELECT * FROM [Logs]"></asp:SqlDataSource>
    
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:smallDeimosConnectionString %>" 
            SelectCommand="SELECT * FROM [News] ORDER BY [NewsID] DESC">
        </asp:SqlDataSource>
        
    
        <asp:TextBox ID="TextBox2" runat="server" Width="608px"></asp:TextBox>
        <asp:Button ID="Button6" runat="server" onclick="Button6_Click" 
            Text="Send message to all players" />
        
    
    </div>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" DataSourceID="SqlDataSource2">
        <Columns>
            <asp:BoundField DataField="NewsID" HeaderText="NewsID" InsertVisible="False" 
                ReadOnly="True" SortExpression="NewsID" />
            <asp:BoundField DataField="PlayerId" HeaderText="PlayerId" 
                SortExpression="PlayerId" />
            <asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date" />
            <asp:BoundField DataField="Message" HeaderText="Message" 
                SortExpression="Message" />
        </Columns>
    </asp:GridView>
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="AllianceID" DataSourceID="SqlDataSource3">
        <Columns>
            <asp:BoundField DataField="AllianceID" HeaderText="AllianceID" 
                InsertVisible="False" ReadOnly="True" SortExpression="AllianceID" />
            <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
            <asp:BoundField DataField="Page" HeaderText="Page" SortExpression="Page" />
            <asp:BoundField DataField="Password" HeaderText="Password" 
                SortExpression="Password" />
        </Columns>
    </asp:GridView>
    <asp:GridView ID="GridView4" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="PlayerId" DataSourceID="SqlDataSource6">
        <Columns>
            <asp:BoundField DataField="PlayerId" HeaderText="PlayerId" 
                InsertVisible="False" ReadOnly="True" SortExpression="PlayerId" />
            <asp:BoundField DataField="PlayerName" HeaderText="PlayerName" 
                SortExpression="PlayerName" />
            <asp:BoundField DataField="ExpPoints" HeaderText="ExpPoints" 
                SortExpression="ExpPoints" />
            <asp:BoundField DataField="Password" HeaderText="Password" 
                SortExpression="Password" />
            <asp:BoundField DataField="OrginID" HeaderText="OrginID" 
                SortExpression="OrginID" />
            <asp:BoundField DataField="Attack" HeaderText="Attack" 
                SortExpression="Attack" />
            <asp:BoundField DataField="Defense" HeaderText="Defense" 
                SortExpression="Defense" />
            <asp:BoundField DataField="Speed" HeaderText="Speed" SortExpression="Speed" />
            <asp:BoundField DataField="Culture" HeaderText="Culture" 
                SortExpression="Culture" />
            <asp:BoundField DataField="Production" HeaderText="Production" 
                SortExpression="Production" />
            <asp:BoundField DataField="Science" HeaderText="Science" 
                SortExpression="Science" />
            <asp:BoundField DataField="Growth" HeaderText="Growth" 
                SortExpression="Growth" />
            <asp:BoundField DataField="ArtifactID" HeaderText="ArtifactID" 
                SortExpression="ArtifactID" />
            <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
            <asp:BoundField DataField="Biology" HeaderText="Biology" 
                SortExpression="Biology" />
            <asp:BoundField DataField="Economy" HeaderText="Economy" 
                SortExpression="Economy" />
            <asp:BoundField DataField="Energy" HeaderText="Energy" 
                SortExpression="Energy" />
            <asp:BoundField DataField="Math" HeaderText="Math" SortExpression="Math" />
            <asp:BoundField DataField="Physics" HeaderText="Physics" 
                SortExpression="Physics" />
            <asp:BoundField DataField="Social" HeaderText="Social" 
                SortExpression="Social" />
            <asp:BoundField DataField="CurrentCulture" HeaderText="CurrentCulture" 
                SortExpression="CurrentCulture" />
            <asp:BoundField DataField="CurrentScience" HeaderText="CurrentScience" 
                SortExpression="CurrentScience" />
            <asp:BoundField DataField="Cash" HeaderText="Cash" SortExpression="Cash" />
            <asp:CheckBoxField DataField="Academy" HeaderText="Academy" 
                SortExpression="Academy" />
            <asp:CheckBoxField DataField="OrbitalCenter" HeaderText="OrbitalCenter" 
                SortExpression="OrbitalCenter" />
            <asp:CheckBoxField DataField="ScienceNetwork" HeaderText="ScienceNetwork" 
                SortExpression="ScienceNetwork" />
            <asp:CheckBoxField DataField="AllianceCenter" HeaderText="AllianceCenter" 
                SortExpression="AllianceCenter" />
            <asp:CheckBoxField DataField="Market" HeaderText="Market" 
                SortExpression="Market" />
            <asp:BoundField DataField="TimeZone" HeaderText="TimeZone" 
                SortExpression="TimeZone" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource6" runat="server" 
        ConnectionString="<%$ ConnectionStrings:smallDeimosConnectionString %>" 
        SelectCommand="SELECT * FROM [Players] WHERE ([PlayerName] = @PlayerName)">
        <SelectParameters>
            <asp:Parameter DefaultValue="pp" Name="PlayerName" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
        ConnectionString="<%$ ConnectionStrings:smallDeimosConnectionString %>" 
        SelectCommand="SELECT * FROM [Alliances]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:smallDeimosConnectionString %>" 
        SelectCommand="SELECT * FROM [News] ORDER BY [Date] DESC">
    </asp:SqlDataSource>
    </form>
</body>
</html>
